# demo04_func.py
def get_info(name, age=100):  # age=100 参数的默认值
    print("%s is %s years old" % (name, age))
get_info("zs")  # name="zs"  age=100
get_info("zs", 18)  # 位置传参 name="zs"  age=18
get_info(18, "zs")  # 位置传参 name=18  age="zs"
# 关键字传参: 指名道姓 (关键字传参一定在位置传参的后面)
get_info(name="lisi", age=20)  # lisi is 20 years old
get_info(age=20, name="lisi")  # lisi is 20 years old
get_info("ww", age=35)  # ww is 35 years old
# get_info(name="zl", 30)  报错



# def foo():
#     print("in foo")
# bar()  # 调用失败
# def bar():
#     print("in bar")
# foo()
# bar()
